import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import HomeView from "../views/Home/Home.vue";
import Layout from "../layout/index.vue";


const routes: Array<RouteRecordRaw> = [
    {
      path: "/login",
      name: "login",
      component: () =>
        import(
          /* webpackChunkName: "login" */ "../views/login/index.vue"
        ),
    },
    {
      path: "/",
      name: "Layout",
      component: Layout,
      children:[
        {
          path: "/home",
          name: "home",
          component: HomeView,
        },
      ]
    },
    
    // {
    //   path: "/about",
    //   name: "about",
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () =>
    //     import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
    // },
    // {
    //   path: "/setting",
    //   name: "setting",
    //   component: () =>
    //     import(
    //       /* webpackChunkName: "setting" */ "../views/SettingView/SettingView.vue"
    //     ),
    // },
    // {
    //   path: "/guide",
    //   name: "guide",
    //   component: () =>
    //     import(
    //       /* webpackChunkName: "setting" */ "../views/GuideView/GuideView.vue"
    //     ),
    // },
  ];
  
  const router = createRouter({
    history: createWebHashHistory(),
    routes,
  });

  export default router;